package org.jetlinks.pro.cassandra.metadata;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.hswebframework.ezorm.rdb.executor.SqlRequest;

import java.nio.ByteBuffer;

@AllArgsConstructor
class PagingSqlRequest implements SqlRequest {

    private final SqlRequest nativeSql;
    @Getter
    private final int pageIndex;
    @Getter
    private final int pageSize;
    @Getter
    private final ByteBuffer pageState;

    @Override
    public String getSql() {
        return nativeSql.getSql();
    }

    @Override
    public Object[] getParameters() {
        return nativeSql.getParameters();
    }

    @Override
    public boolean isEmpty() {
        return nativeSql.isEmpty();
    }
}
